<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>修改图书信息</title>
		<link rel="stylesheet" type="text/css"
			href="../css/commonBookTest.css">
		<!--<script type="text/javascript"
			src="${CONTEXT_ROOT }/fckeditor/fckeditor.js"></script>
		-->
		<style type="text/css">
body {
	font-family: 华文楷体;
	color: #000000;
	background-color: #556b2f;
}

a:active {
	color: #ffffff;
	text-decoration: none;
}

a:visited {
	color: #96CFFC;
	text-decoration: none;
}

a:hover {
	color: yellow;
	text-decoration: underline;
}

.ta {
	color: #ffffff;
	background-color: #556b2f;
	position: relative;
	top: 20px;
}

.ta01 {
	background-color: #ffffff;
	position: relative;
	top: 0px;
}

.td00 {
	font-family: 华文楷体;
	background-color: #ffffff;
}
</style>
	</head>
	<body>
		<center>
			<form action="${CONTEXT_ROOT}/SysBookAddServlet" method="post"
				enctype="multipart/form-data">
				<input id="parentCategoryId" name="parentCategoryId" type="hidden"
					value="${parentCategoryId}"></input>
				<input id="path" name="path" type="hidden" value="${path}"></input>
				<table width="80%" border="0" class="ta">
					<tr>
						<td align="left">
							<c:if test="${not empty path }">
								<a href="${CONTEXT_ROOT }/SysBookServlet?method=list">图书分类</a>- ${path}
					</c:if>
						</td>
						<td align="right">
							<a
								href="${CONTEXT_ROOT}/SysBookServlet?method=list&parentCategoryId=${parentCategoryId}">返回列表</a>
						</td>
					</tr>
				</table>
				<br>
				<table width="80%" border="1" class="ta01">
					<tr>
						<th height="50" colspan="3">
							修改图书信息--${book.bookName }
						</th>
					</tr>
					<tr>
						<td align="right" valign="middle" width="17%">
							书名&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle" width="50%">
							<input type="hidden" value="${book.bookId}" name="bookId">
							<input type="text" name="bookName" value="${book.bookName }"
								size="50" />
						</td>
						<td width="25%" rowspan="10">
							<img
								src="${CONTEXT_ROOT}/upload/${book.bookImg==''?'no_img.jpg':book.bookImg}"
								height="170px" />
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							分类&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle" width="50%">
							${bookCategory.categoryName }
							<input type="hidden" value="${bookCategory.categoryId}"
								name="categoryId">
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							上传图片&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="file" name="bookImg" size="40" />
							<input type="hidden" name="bookImg" value="${book.bookImg}">
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							作者&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="text" name="bookAuthor" value="${book.bookAuthor }"
								size="50" />
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							出版社&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<select name="publishId" style="width: 200px">
								<c:forEach items="${publishList }" var="publish">
									<option value="${publish.publishId}"
										${publish.publishId==book.publishId?'selected':''}>
										${publish.publishName}
									</option>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">
							出版日期&nbsp;&nbsp;
						</td>
						<td align="left">
							<input type="text" name="publishDate" value="${book.publishDate}"
								size="50" />
						</td>
					</tr>
					<tr>
						<td align="right">
							是否是特价&nbsp;&nbsp;
						</td>
						<td align="left">
							<select name="isSpecialPrice" style="width: 80px">
								<option value="1" ${book.isSpecialPrice==1?"selected":""}>
									是
								</option>
								<option value="0" ${book.isSpecialPrice==0?"selected":""}>
									否
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							是否是新书&nbsp;&nbsp;
						</td>
						<td align="left">
							<select name="isNew" style="width: 80px">
								<option value="1" ${book.isNew==1? 'selected="selected"':''}>
									是
								</option>
								<option value="0" ${book.isNew==0? 'selected="selected"':''}>
									否
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							是否是推荐书&nbsp;&nbsp;
						</td>
						<td align="left">
							<select name="isCommend" style="width: 80px">
								<option value="0" ${book.isCommend==0?"selected":""}>
									否
								</option>
								<option value="1" ${book.isCommend==1?"selected":""}>
									是
								</option>
							</select>
						</td>
					<tr>
						<td align="right" valign="middle">
							价格&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="text" name="bookPrice" value="${book.bookPrice }"
								size="10" />
							元
							<br>
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">

							图书简介&nbsp;&nbsp;
						</td>
						<td class="td00" valign="top" colspan="2">
							<textarea name="bookInfo" cols="80" rows="8">${book.bookInfo}</textarea>
						</td>
					</tr>
					<tr>
						<td>
							<br>
						</td>
						<td align="center" colspan="2">
							<input type="hidden" name="method" value="update">
							<input type="submit" name="button" value="提交">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="reset" name="button" value="重置">
						</td>
					</tr>
				</table>
			</form>
		</center>
	</body>
</html>